x86/shadow: adjust mask shadow_audit_tables() passes to hash_foreach()
authorJan Beulich <jbeulich@suse.com>
Thu, 29 Jan 2015 13:42:20 +0000 (13:42 +0000)
committerTim Deegan <tim@xen.org>
Thu, 29 Jan 2015 13:44:49 +0000 (13:44 +0000)
It so far having been ~1 made most of the code preceding the call
pointless, but I assume this wasn't meant to be that way. Also replace
the remaining hard coded ~1 with an expression documenting the
intention a little better.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Adjust again to use SHF_page_type_mask, at Jan's suggestion.

Signed-off-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm/shadow/common.c

index 7e6aeeb2c352699fc0dd18268312dff82ef32582..64c5a283945b7bb0963e0fe56d68fc8001060fe5 100644 (file)
@@ -3761,7 +3761,7 @@ void shadow_audit_tables(struct vcpu *v)
 #endif
 
     if ( SHADOW_AUDIT & SHADOW_AUDIT_ENTRIES_FULL )
-        mask = ~1; /* Audit every table in the system */
+        mask = SHF_page_type_mask; /* Audit every table in the system */
     else 
     {
         /* Audit only the current mode's tables */
@@ -3776,7 +3776,7 @@ void shadow_audit_tables(struct vcpu *v)
         }
     }
 
-    hash_foreach(v, ~1, callbacks, _mfn(INVALID_MFN));
+    hash_foreach(v, mask, callbacks, _mfn(INVALID_MFN));
 }
 
 #endif /* Shadow audit */